home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 1995 December / PC Answers December 1995 (disc errors).iso / mxc / eqtack.dir / 00005_MS for EQTACK.ls < prev    next >
Encoding:
Text File  |  1995-05-01  |  2.7 KB  |  118 lines

  1. global fixPal, myLine, csn, lem, palName, bd, tpal, myLine2, gdirmovie, gVolume, gBackColor, gForeColor
  2.  
  3. on startMovie
  4.   if the machineType < 256 then
  5.     openXLib("XPALETTE")
  6.     set fixPal to fixPalette(mnew, the stageLeft, the stageTop, the stageRight, the stageBottom)
  7.   else
  8.     openXLib("XPALETTE.dll")
  9.     set fixPal to XPALETTE(mnew)
  10.   end if
  11.   if the colorDepth = 8 then
  12.     set gBackColor to 31
  13.     set gForeColor to 255
  14.   end if
  15.   if the colorDepth = 16 then
  16.     if the machineType < 256 then
  17.       set gBackColor to 31
  18.       set gForeColor to 255
  19.     else
  20.       set gBackColor to 31
  21.       set gForeColor to 255
  22.     end if
  23.   end if
  24.   if the colorDepth = 24 then
  25.     if the machineType < 256 then
  26.       set gBackColor to 31
  27.       set gForeColor to 255
  28.     else
  29.       set gBackColor to 31
  30.       set gForeColor to 255
  31.     end if
  32.   end if
  33.   if the colorDepth = 32 then
  34.     if the machineType < 256 then
  35.       set gBackColor to 31
  36.       set gForeColor to 255
  37.     else
  38.       set gBackColor to 46542
  39.       set gForeColor to 0
  40.     end if
  41.   end if
  42.   set auto to 0
  43.   set ok to 3
  44.   set myLine to 1
  45.   set myLine2 to 1
  46.   set tpal to 201
  47.   set csn to the number of lines in field "asset list"
  48.   cursor(0)
  49.   colorMe()
  50.   txtHandler()
  51.   checkMooV()
  52.   updateStage()
  53. end
  54.  
  55. on checkMooV
  56.   global myLine, gVolume
  57.   if (the castNum of sprite 10 >= 101) and (the castNum of sprite 10 <= 104) then
  58.     set the controller of cast (myLine + 100) to 0
  59.     set the controller of cast (myLine + 100) to 1
  60.   else
  61.     if (the castNum of sprite 10 >= 114) and (the castNum of sprite 10 <= 117) then
  62.       set the controller of cast (myLine + 100) to 0
  63.       set the controller of cast (myLine + 100) to 1
  64.     else
  65.       exit
  66.     end if
  67.   end if
  68. end
  69.  
  70. on txtHandler
  71.   global myLine, gVolume
  72.   if ((myLine >= 1) and (myLine <= 4)) or ((myLine >= 14) and (myLine <= 17)) then
  73.     set the visible of sprite 6 to 0
  74.   else
  75.     set the visible of sprite 6 to 1
  76.   end if
  77.   updateStage()
  78.   puppetPalette(myLine + 200)
  79.   patchPal()
  80.   set the castNum of sprite 4 to myLine + 50
  81.   set the castNum of sprite 10 to myLine + 100
  82.   updateStage()
  83. end
  84.  
  85. on colorMe
  86.   set the foreColor of field "asset list" to gForeColor
  87.   if myLine = -1 then
  88.     set the foreColor of field "asset list" to gForeColor
  89.     exit
  90.   end if
  91.   set the foreColor of line myLine of field "asset list" to gBackColor
  92. end
  93.  
  94. on patchPal
  95.   fixPal(mPatchIt)
  96. end
  97.  
  98. on stopMovie
  99.   if the machineType < 256 then
  100.     fixPal(mdispose)
  101.     closeXLib("XPALETTE")
  102.   else
  103.     fixPal(mdispose)
  104.     closeXLib("XPALETTE.dll")
  105.   end if
  106. end
  107.  
  108. on flushMe
  109.   if the machineType = 256 then
  110.     openXLib("GLOBMEM")
  111.     set OBJ to GLOBMEM(mnew)
  112.     OBJ(mFreeHandles, 8192)
  113.     OBJ(mFreeHandles, 8192)
  114.     OBJ(mFreeHandles, 8192)
  115.     OBJ(mdispose)
  116.   end if
  117. end
  118.